package org.lc.stk.model.banks;

import org.hibernate.annotations.Comment;
import org.lc.stk.model.course.Course;

import jakarta.persistence.DiscriminatorValue;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;

/**
 * 单个课程的题库
 */
@Entity
@Table(name = "course_question_banks")
@DiscriminatorValue("1")  // 单课程试题库
public class CourseQuestionBank extends SystemBank {

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "course_id", nullable = false)
    @Comment("所属课程")
    private Course course;

    public Course getCourse() {
        return course;
    }

    public void setCourse(Course course) {
        this.course = course;
    }
}
